package components.banners
{
	import UIFree.uif_component;
	import UIFree.uif_ecomponent;
	import UIFree.uif_loader;
	
	import flash.geom.Rectangle;

	public class clt_waitBanner extends clt_fotocacheBanner {
/*<script src="http://start.fotostrana.ru/static/js/swfobject.js" type="text/javascript"></script> <div id="banner2"></div> <script>
var s17 = new SWFObject("http://start.fotostrana.ru/promo/fotostrana/600x120/600x120_dating4.swf?gender=f","banner2","600","120","9");
s17.addParam("allowScriptAccess","always");
s17.addParam("scaleMode","noscale");
s17.addParam("wmode","transparent");
s17.addParam("flashVars","link1=http%3A%2F%2Ffotostrana.ru%2Fsignup%2F%3Fland%3D1%26ref_id=181668131");
s17.write("banner2");
</script>*/

	    
	    private var banners: Array = [
	    	'http://start.fotostrana.ru/promo/fotostrana/600x120/600x120_dating5.swf',
	    	'http://start.fotostrana.ru/promo/fotostrana/600x120/600x120_dating4.swf'
	    ]
	    
		override public function get params() : String {
	        return '?link1=http%3A%2F%2Ffotostrana.ru%2Fsignup%2F%3Fland%3D1%26ref_id=181668131&gender=' + genders[user.sex];
		}
		
		public function clt_waitBanner(parent:uif_component) {
			var rect: Rectangle = parent.getInner();
			super(parent, rect.x, rect.y, 600, 120);
			
/*			var user: Object = (app as clt_clothingBase).user;
	        var params: String = "?link1=http%3A%2F%2Ffotostrana.ru%2Fsignup%2F%3Fland%3D1%26ref_id=468282879&gender=" + genders[parseInt(user.sex)];
*/
			var ld: uif_loader = new uif_loader(this, banners[Math.floor(Math.random() * 2)] + params);
			ld.mask = new uif_ecomponent(this, 0, 0, width, height, 'white'); 
		}
	}
}